package com.szzg10.thinking.chapter11;

public class StackTest {

	public static void main(String[] args) {
		
		Stack<String> stack = new Stack<String>();
		for(String element: "My dog has fleas".split(" ")) {
			stack.push(element);
		}
		
		while(!stack.empty()) {
			System.out.print(stack.pop() + " ");
		}
	}
}
